<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://java.sun.com/jsf/facelets"> <!-- (1) -->
<ui:composition>
	<h:panelGroup rendered="#{contextoBean.usuarioEstaLogado}" layout="block">
		<div id="userInfo">
			<h:form id="logout_form"> 
				<p>
					#{contextoBean.usuarioLogado.login}
					 -
					 <h:commandLink value="sair"
					 	onclick="document.location='#{request.contextPath}/j_spring_security_logout'"
					 	title="Sair">
					 </h:commandLink>
					</p>
			</h:form>
		</div>
		<div id="menuWrap">
			<h:form>
				<p:menubar autoSubmenuDisplay="true">
	            	<p:submenu label="Listagem">
	                	<p:menuitem value="Usuários" outcome="/admin/usuario.xhtml" />
	                    <p:menuitem value="Funcionários" outcome="/restrito/funcionario.xhtml"/>
	                    <p:menuitem value="Contratos" outcome="/restrito/contrato.xhtml"/>
	                </p:submenu>
				</p:menubar>
			</h:form>
		</div> 
	</h:panelGroup>
</ui:composition>
</html>
